<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{tradeRuleList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="moduleName" value="交易规则管理"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="searchForm">
			<p:panel id="searchResult">
				<f:facet name="header">交易规则管理</f:facet>
				<p:dataTable value="#{tradeRuleList.resultList}" var="_tradeRule" rowIndexVar="_rowVar">
					
					<p:column headerText="序号" style="width:100px;">
						<h:outputText value="#{_rowVar + 1}" />
					</p:column>
					
					<ui:remove><p:column>
						<f:facet name="header">交易规则</f:facet>
						<h:outputText value="#{_tradeRule.content}" escape="false">
						</h:outputText>
					</p:column></ui:remove>
					
					<p:column>
						<f:facet name="header">创建时间</f:facet>
						<h:outputText value="#{_tradeRule.createDate}">
							<f:convertDateTime pattern="yyyy-MM-dd HH"/>
						</h:outputText>
					</p:column>
					
					<p:column style="text-align: center;width:100px;">
						<f:facet name="header">操作</f:facet>
						<p:button value="编辑" outcome="TradeRuleEdit.xhtml">							
							<f:param name="tradeRuleId" value="#{_tradeRule.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{tradeRuleList}" />
			</ui:include>
			
		</h:form>
		
		<p:button href="TradeRuleEdit.xhtml" value="新增交易规则"></p:button>
      
   	</ui:define>
</ui:composition>
